
import axios from "axios";
const baseUrl='http://localhost:8000'
export const Addit=async(obj)=>{
    let res=await axios.post(`${baseUrl}/books`,obj)
    return res.data
}
export const Editit=async(id,obj)=>{
    let res=await axios.put(`${baseUrl}/books/${id}`,obj)
    return res.data
}
export const Delit=async(id)=>{
    let res=await axios.delete(`${baseUrl}/books/${id}`)
    return res.data
}
export const Gitit=async()=>{
    let res=await axios.get(`${baseUrl}/books`)
    return res.data
}
export const GitId=async(id)=>{
    let res=await axios.get(`${baseUrl}/books/${id}`)
    return res.data
}